﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link href="${path}/resources/js/plugins/TreeTable/css/jquery.treeTable.css" rel="stylesheet" type="text/css"/>
    <link href="${path}/resources/css/resume.css" rel="stylesheet" type="text/css"/>
    <style>
        #content {
            width: 1000px;
            margin: 20px auto;
        }

        .treeTable {
            border: solid 1px #ccc;
        }

        .treeTable tbody tr td {
            border: 1px solid #ccc !important;
            padding: 8px 0px 8px 5px !important;
            background: #FFF !important;
        }

        .printmenu {
            text-align: right;
        }

        .printmenu button {
            border: none;
            background: orange;
            padding: 5px;
            color: #FFF;
        }

        .printmenu button:hover {
            background: #FF8000;
        }

        body {
            background: none !important;
        }
    </style>
</head>
<body>
<div id="content">
    <form id="Validform" method="post" action="${path}/Do/SZResume/EditAction">
        <input type="hidden" value="${userresume.id}" name="userresume.id"/>
        <div id="resumemenu" class="left resumemenu">
            <div class="resumeimg">
                <img id="headimg" width="160" height="224" src="${fpath}/resources/UserHead/${userresume.head}"/>
            </div>
            <div class="btnbar">
                <button type="submit" class="orange" style="width:100%;">保存简历</button>
            </div>
        </div>
        <div class="right pagecont">
            <div class="resumetitle">1、个人信息&emsp;<span class="required">（以下信息全为必填项！）</span></div>
            <table class="treeTable inputform resumetb">
                <tbody>
                <tr>
                    <td width="100">简历编号：</td>
                    <td width="240">${userresume.code}</td>
                    <td width="100">姓名：</td>
                    <td>${userresume.name}</td>
                </tr>
                <tr>
                    <td>身份证号：</td>
                    <td>${userresume.cardno}</td>
                    <td>出生日期：</td>
                    <td>
                        <fmt:formatDate value="${userresume.birthday}" pattern="yyyy-MM-dd"/>
                    </td>
                </tr>
                <tr>
                    <td>电子邮箱：</td>
                    <td>${userresume.email}</td>
                    <td>手机号码：</td>
                    <td>${userresume.tel}</td>
                </tr>
                <tr>
                    <td>性别：</td>
                    <td>
                        <select name="userresume.sexcode" datatype="*" nullmsg="性别不能为空！">
                            <option value="">请选择</option>
                            ${xb}
                        </select>
                        <input type="hidden" value="${userresume.sexcode}"/>
                        <input type="hidden" value="${userresume.sexname}" name="userresume.sexname"/>
                    </td>
                    <td>民族：</td>
                    <td>
                        <select name="userresume.mzcode" datatype="*" nullmsg="民族不能为空！">
                            <option value="">请选择</option>
                            ${mz}
                        </select>
                        <input type="hidden" value="${userresume.mzcode}"/>
                        <input type="hidden" value="${userresume.mzname}" name="userresume.mzname"/>
                    </td>
                </tr>
                <tr>
                    <td>身高(CM)：</td>
                    <td><input type="text" name="userresume.height" value="${userresume.height}" datatype="zzzs"
                               nullmsg="身高不能为空！"/></td>
                    <td>籍贯：</td>
                    <td>
                        <select name="userresume.jg" datatype="*" nullmsg="籍贯不能为空！">
                            <option value="">请选择</option>
                            ${jg}
                        </select>
                        <input type="hidden" value="${userresume.jg}"/>
                    </td>
                </tr>
                <tr>
                    <td>政治面貌：</td>
                    <td>
                        <select name="userresume.zzmmcode" datatype="*" nullmsg="政治面貌不能为空！">
                            <option value="">请选择</option>
                            ${zzmm}
                        </select>
                        <input type="hidden" value="${userresume.zzmmcode}"/>
                        <input type="hidden" value="${userresume.zzmmname}" name="userresume.zzmmname"/>
                    </td>
                    <td>婚姻状况：</td>
                    <td>
                        <select name="userresume.mcode" datatype="*" nullmsg="婚姻状况不能为空！">
                            <option value="">请选择</option>
                            ${hyzk}
                        </select>
                        <input type="hidden" value="${userresume.mcode}"/>
                        <input type="hidden" value="${userresume.mname}" name="userresume.mname"/>
                    </td>
                </tr>
                <tr>
                    <td>户口性质：</td>
                    <td><select name="userresume.hkcode" datatype="*" nullmsg="户口性质不能为空！">
                        <option value="">请选择</option>
                        ${hkxz}
                    </select>
                        <input type="hidden" value="${userresume.hkcode}"/>
                        <input type="hidden" value="${userresume.hkname}" name="userresume.hkname"/>
                    </td>
                    <td>户口所在地：</td>
                    <td><input type="text" name="userresume.hukouaddress" value="${userresume.hukouaddress}"
                               datatype="*" nullmsg="户口所在地不能为空！"/></td>
                </tr>
                <tr>
                    <td>现居住地：</td>
                    <td colspan="3"><input type="text" name="userresume.nowaddress" value="${userresume.nowaddress}"
                                           datatype="*" nullmsg="现居住地不能为空！"/></td>
                </tr>
                <tr>
                    <td>家庭电话：</td>
                    <td><input type="text" name="userresume.hometel" value="${userresume.hometel}" datatype="*"
                               nullmsg="家庭电话不能为空！"/></td>
                    <td>服从调配：</td>
                    <td>
                        <select name="userresume.distribution" datatype="*" nullmsg="请选择是否服从调配！">
                            <option value="">请选择</option>
                            <option value="0">是</option>
                            <option value="1">否</option>
                        </select>
                        <input type="hidden" value="${userresume.distribution}"/>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="resumetitle" style="margin-top:5px;">2、职业概况/求职意向&emsp;<span class="required">（以下信息全为必填项！）</span>
            </div>
            <table class="treeTable inputform">
                <tbody>
                <tr>
                    <td width="100">工作经验(年)：</td>
                    <td width="240"><input type="text" name="userresume.workexperience"
                                           value="${userresume.workexperience}" value="0" datatype="zzs"
                                           nullmsg="工作经验不能为空！"/></td>
                    <td width="100">到岗时间：</td>
                    <td>
                        <select name="userresume.attendancetime" datatype="*" nullmsg="到岗时间不能为空">
                            <option value="">请选择</option>
                            <option value="随时">随时</option>
                            <option value="1个月内">1个月内</option>
                            <option value="2个月内">2个月内</option>
                            <option value="3个月内">3个月内</option>
                            <option value="4个月内">4个月内</option>
                            <option value="5个月内">5个月内</option>
                            <option value="6个月内">6个月内</option>
                            <option value="7个月内">7个月内</option>
                            <option value="8个月内">8个月内</option>
                            <option value="9个月内">9个月内</option>
                            <option value="10个月内">10个月内</option>
                            <option value="11个月内">11个月内</option>
                            <option value="12个月内">12个月内</option>
                            <option value="1年及以上">1年及以上</option>
                        </select>
                        <input type="hidden" value="${userresume.attendancetime}"/>
                    </td>
                </tr>
                <tr>
                    <td>目前月薪(RMB):</td>
                    <td>
                        <select name="userresume.presentsalaryamount" datatype="*" nullmsg="目前月薪不能为空！">
                            <option value="">请选择</option>
                            <option value="2500及以下">2500及以下</option>
                            <option value="2500-4000">2500-4000</option>
                            <option value="4000-8000">4000-8000</option>
                            <option value="8000及以上">8000及以上</option>
                        </select>
                        <input type="hidden" value="${userresume.presentsalaryamount}"/>
                    </td>
                    <td>期望月薪(RMB):</td>
                    <td>
                        <select name="userresume.expectedsalaryamount" datatype="*" nullmsg="期望月薪不能为空！">
                            <option value="">请选择</option>
                            <option value="2500及以下">2500及以下</option>
                            <option value="2500-4000">2500-4000</option>
                            <option value="4000-8000">4000-8000</option>
                            <option value="8000及以上">8000及以上</option>
                        </select>
                        <input type="hidden" value="${userresume.expectedsalaryamount}"/>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="resumetitle" style="margin-top:5px;">3、教育背景&emsp;<span class="required">（以下信息全为必填项！）</span>
            </div>
            <div>
                <c:if test="${empty educations}">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">入学时间：</td>
                            <td width="240"><input type="text" name="usereducation[0].starttime" datatype="*"
                                                   nullmsg="入学时间不能为空！" class="select" onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                            <td width="100">毕业时间：</td>
                            <td><input type="text" name="usereducation[0].endtime" datatype="*" nullmsg="毕业时间不能为空！"
                                       class="select" onFocus="blur()"
                                       onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>学校名称：</td>
                            <td><input type="text" name="usereducation[0].schoolname" datatype="*" nullmsg="学校名称不能为空！"/>
                            </td>
                            <td>专业名称：</td>
                            <td><input type="text" name="usereducation[0].majorname" datatype="*" nullmsg="专业名称不能为空！"/>
                            </td>
                        </tr>
                        <tr>
                            <td>学历：</td>
                            <td>
                                <select name="usereducation[0].educationcode" datatype="*" nullmsg="学历不能为空！">
                                    <option value="">请选择</option>
                                        ${xl}
                                </select>
                                <input type="hidden" name="usereducation[0].educationcodexx"/>
                                <input type="hidden" name="usereducation[0].educationname"/>
                            </td>
                            <td>学位：</td>
                            <td>
                                <select name="usereducation[0].degreecode" datatype="*" nullmsg="学位不能为空！">
                                    <option value="">请选择</option>
                                        ${xw}
                                </select>
                                <input type="hidden" name="usereducation[0].degreecodexx"/>
                                <input type="hidden" name="usereducation[0].degreename"/>
                            </td>
                        </tr>
                        <tr>
                            <td>毕业情况：</td>
                            <td>
                                <select name="usereducation[0].tcode" datatype="*" nullmsg="毕业情况不能为空！">
                                    <option value="">请选择</option>
                                        ${byxs}
                                </select>
                                <input type="hidden" name="usereducation[0].tcodexx"/>
                                <input type="hidden" name="usereducation[0].tname"/>
                            </td>
                            <td>学习形式：</td>
                            <td>
                                <select name="usereducation[0].fulltime" datatype="*" nullmsg="是否全日制普通高等教育不能为空！">
                                    <option value="">请选择</option>
                                        ${isornot}
                                </select>
                                <input type="hidden" name="usereducation[0].fulltimexx"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="line"></div>
                </c:if>
                <c:forEach var="education" items="${educations}" varStatus="item">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">入学时间：</td>
                            <td width="240"><input type="text" name="usereducation[${item.index}].starttime"
                                                   value="<fmt:formatDate value="${education.starttime}" pattern="yyyy-MM-dd" />"
                                                   datatype="*" nullmsg="开始时间不能为空！" class="select" onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                            <td width="100">毕业时间：</td>
                            <td><input type="text" name="usereducation[${item.index}].endtime"
                                       value="<fmt:formatDate value="${education.endtime}" pattern="yyyy-MM-dd" />"
                                       datatype="*" nullmsg="结束时间不能为空！" class="select" onFocus="blur()"
                                       onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>学校名称：</td>
                            <td><input type="text" name="usereducation[${item.index}].schoolname"
                                       value="${education.schoolname}" datatype="*" nullmsg="学校名称不能为空！"/></td>
                            <td>专业名称：</td>
                            <td><input type="text" name="usereducation[${item.index}].majorname"
                                       value="${education.majorname}" datatype="*" nullmsg="专业名称不能为空！"/></td>
                        </tr>
                        <tr>
                            <td>学历：</td>
                            <td>
                                <select name="usereducation[${item.index}].educationcode" datatype="*"
                                        nullmsg="学历不能为空！">
                                    <option value="">请选择</option>
                                        ${xl}
                                </select>
                                <input type="hidden" value="${education.educationcode}"
                                       name="usereducation[${item.index}].educationcodexx"/>
                                <input type="hidden" value="${education.educationname}"
                                       name="usereducation[${item.index}].educationname"/>
                            </td>
                            <td>学位：</td>
                            <td>
                                <select name="usereducation[${item.index}].degreecode" datatype="*" nullmsg="学位不能为空！">
                                    <option value="">请选择</option>
                                        ${xw}
                                </select>
                                <input type="hidden" value="${education.degreecode}"
                                       name="usereducation[${item.index}].degreecodexx"/>
                                <input type="hidden" value="${education.degreename}"
                                       name="usereducation[${item.index}].degreename"/>
                            </td>
                        </tr>
                        <tr>
                            <td>毕业情况：</td>
                            <td>
                                <select name="usereducation[${item.index}].tcode" datatype="*" nullmsg="毕业情况不能为空！">
                                    <option value="">请选择</option>
                                        ${byxs}
                                </select>
                                <input type="hidden" value="${education.tcode}"
                                       name="usereducation[${item.index}].tcodexx"/>
                                <input type="hidden" value="${education.tname}"
                                       name="usereducation[${item.index}].tname"/>
                            </td>
                            <td>学习形式：</td>
                            <td>
                                <select name="usereducation[${item.index}].fulltime" datatype="*"
                                        nullmsg="是否全日制普通高等教育不能为空！">
                                    <option value="">请选择</option>
                                        ${isornot}
                                </select>
                                <input type="hidden" value="${education.fulltime}"
                                       name="usereducation[${item.index}].fulltimexx"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <c:if test='${item.index!=0}'>
                        <div class="resumedel">
                            <button type="button" class="delresumeitem">删除本条信息</button>
                        </div>
                    </c:if>
                    <div class="line"></div>
                </c:forEach>
                <div style="padding:5px 0;">
                    <button type="button" class="addresumeitem">添加一条教育背景信息</button>
                </div>
            </div>
            <div class="resumetitle" style="margin-top:5px;">4、工作经验&emsp;<span class="required">（若无工作经验可忽略！）</span>
            </div>
            <div>
                <c:if test="${empty workexperiences}">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td>公司名称：</td>
                            <td><input type="text" name="userworkexperience[0].companyname"/></td>
                            <td>薪资待遇：</td>
                            <td>
                                <select name="userworkexperience[0].salary">
                                    <option value="">请选择</option>
                                    <option value="2500及以下">2500及以下</option>
                                    <option value="2500-4000">2500-4000</option>
                                    <option value="4000-8000">4000-8000</option>
                                    <option value="8000及以上">8000及以上</option>
                                </select>
                                <input type="hidden" value="" name="userworkexperience[0].salaryxx"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="100">工作部门：</td>
                            <td width="240"><input type="text" name="userworkexperience[0].department"/></td>
                            <td width="100">工作岗位：</td>
                            <td width="305"><input type="text" name="userworkexperience[0].position"/></td>
                        </tr>
                        <tr>
                            <td>开始时间：</td>
                            <td><input type="text" name="userworkexperience[0].starttime" class="select"
                                       onFocus="blur()" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                            <td>结束时间：</td>
                            <td><input type="text" name="userworkexperience[0].endtime" class="select" onFocus="blur()"
                                       onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>工作内容：</td>
                            <td colspan="3"><textarea name="userworkexperience[0].jobduties"></textarea></td>
                        </tr>
                        <tr>
                            <td>离职原因(选填)：</td>
                            <td colspan="3"><textarea name="userworkexperience[0].reason"></textarea></td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="line"></div>
                </c:if>
                <c:forEach var="workexperience" items="${workexperiences}" varStatus="item">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td>公司名称：</td>
                            <td><input type="text" name="userworkexperience[${item.index}].companyname"
                                       value="${workexperience.companyname}"/></td>
                            <td>薪资待遇：</td>
                            <td>
                                <select name="userworkexperience[${item.index}].salary">
                                    <option value="">请选择</option>
                                    <option value="2500及以下">2500及以下</option>
                                    <option value="2500-4000">2500-4000</option>
                                    <option value="4000-8000">4000-8000</option>
                                    <option value="8000及以上">8000及以上</option>
                                </select>
                                <input type="hidden" name="userworkexperience[${item.index}].salaryxx"
                                       value="${workexperience.salary}"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="100">工作部门：</td>
                            <td width="240"><input type="text" name="userworkexperience[${item.index}].department"
                                                   value="${workexperience.department}"/></td>
                            <td width="100">工作岗位：</td>
                            <td width="305"><input type="text" name="userworkexperience[${item.index}].position"
                                                   value="${workexperience.position}"/></td>
                        </tr>
                        <tr>
                            <td>开始时间：</td>
                            <td><input type="text" name="userworkexperience[${item.index}].starttime"
                                       value="<fmt:formatDate value="${workexperience.starttime}" pattern="yyyy-MM-dd" />"
                                       class="select" onFocus="blur()"
                                       onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                            <td>结束时间：</td>
                            <td><input type="text" name="userworkexperience[${item.index}].endtime"
                                       value="<fmt:formatDate value="${workexperience.endtime}" pattern="yyyy-MM-dd" />"
                                       class="select" onFocus="blur()"
                                       onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>工作内容：</td>
                            <td colspan="3"><textarea
                                    name="userworkexperience[${item.index}].jobduties">${workexperience.jobduties}</textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>离职原因(选填)：</td>
                            <td colspan="3"><textarea
                                    name="userworkexperience[${item.index}].reason">${workexperience.reason}</textarea>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <c:if test='${item.index!=0}'>
                        <div class="resumedel">
                            <button type="button" class="delresumeitem">删除本条信息</button>
                        </div>
                    </c:if>
                    <div class="line"></div>
                </c:forEach>
                <div style="padding:5px 0;">
                    <button type="button" class="addresumeitem">添加一条工作经验信息</button>
                </div>
            </div>
            <div class="resumetitle" style="margin-top:5px;">5、专业技术资格&emsp;<span class="required">（若无专业技术职务可忽略！）</span>
            </div>
            <table class="treeTable inputform">
                <tbody>
                <tr>
                    <td width="100">类别：</td>
                    <td>
                        <select name="userresume.posttypecode" id="postt">
                            <option value="">请选择</option>
                            ${posttype}
                        </select>
                        <input type="hidden" value="${userresume.posttypecode}"/>
                        <input type="hidden" value="${userresume.posttypename}" name="userresume.posttypename"/>
                    </td>
                    <td width="100">所属专业：</td>
                    <td width="300"><input type="text" name="userresume.postspecialty"
                                           value="${userresume.postspecialty}"/></td>
                </tr>
                <tr>
                    <td>级别：</td>
                    <td>
                        <select name="userresume.postlevelcode" id="postl">
                            <option value="">请选择</option>
                        </select>
                        <input type="hidden" value="${userresume.postlevelcode}"/>
                        <input type="hidden" value="${userresume.postlevelname}" name="userresume.postlevelname"/>
                    </td>
                    <td>取得时间：</td>
                    <td><input type="text" name="userresume.postgettime"
                               value="<fmt:formatDate value="${userresume.postgettime}" pattern="yyyy-MM-dd" />"
                               class="select" onFocus="blur()"
                               onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                </tr>
                <tr>
                    <td>发证机构：</td>
                    <td colspan="3"><input type="text" name="userresume.postcompany" value="${userresume.postcompany}"/>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="resumetitle" style="margin-top:5px;">6、职业资格证&emsp;<span class="required">（若无职业资格证可忽略！）</span>
            </div>
            <table class="treeTable inputform">
                <tbody>
                <tr>
                    <td width="100">技能等级：</td>
                    <td width="80">
                        <select name="userresume.qllevelpid" id="jndjp">
                            <option value="">请选择</option>
                            ${jndj}
                        </select>
                        <input type="hidden" value="${userresume.qllevelpid}"/>
                        <input type="hidden" value="${userresume.qllevelpname}" name="userresume.qllevelpname"/>
                    </td>
                    <td width="120">
                        <select name="userresume.qllevelcode" id="jndj">
                            <option value="">请选择</option>
                        </select>
                        <input type="hidden" value="${userresume.qllevelcode}"/>
                        <input type="hidden" value="${userresume.qllevelname}" name="userresume.qllevelname"/>
                    </td>
                    <td>
                        <select name="userresume.qllevelscode" id="jnds">
                            <option value="">请选择</option>
                        </select>
                        <input type="hidden" value="${userresume.qllevelscode}"/>
                        <input type="hidden" value="${userresume.qllevelsname}" name="userresume.qllevelsname"/>
                    </td>
                    <td width="100">工种：</td>
                    <td width="195"><input type="text" name="userresume.qltype" value="${userresume.qltype}"/></td>
                </tr>
                <tr>
                    <td>发证机构：</td>
                    <td colspan="3"><input type="text" name="userresume.qlorg" value="${userresume.qlorg}"/></td>
                    <td>取得时间：</td>
                    <td><input type="text" name="userresume.qlgettime"
                               value="<fmt:formatDate value="${userresume.qlgettime}" pattern="yyyy-MM-dd" />"
                               class="select" onFocus="blur()"
                               onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                </tr>
                </tbody>
            </table>
            <div class="resumetitle" style="margin-top:5px;">7、其他资格证&emsp;<span
                    class="required">（如：驾驶证等，若无其他资格证可忽略！）</span></div>
            <table class="treeTable inputform">
                <tbody>
                <tr>
                    <td width="100">名称：</td>
                    <td><input type="text" name="userresume.othname" value="${userresume.othname}"/></td>
                    <td width="100">证书编号：</td>
                    <td width="300"><input type="text" name="userresume.othcode" value="${userresume.othcode}"/></td>
                </tr>
                <tr>
                    <td>类型：</td>
                    <td>
                        <select name="userresume.othtypecode">
                            <option value="">请选择</option>
                            ${qtzj}
                        </select>
                        <input type="hidden" value="${userresume.othtypecode}"/>
                        <input type="hidden" value="${userresume.othtypename}"/>
                    </td>
                    <td>专业：</td>
                    <td><input type="text" name="userresume.othzy" value="${userresume.othzy}"/></td>
                </tr>
                <tr>
                    <td>等级：</td>
                    <td><input type="text" name="userresume.othlevel" value="${userresume.othlevel}"/></td>
                    <td>取得时间：</td>
                    <td><input type="text" name="userresume.othdate"
                               value="<fmt:formatDate value="${userresume.othdate}" pattern="yyyy-MM-dd" />"
                               class="select" onFocus="blur()"
                               onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                </tr>
                <tr>
                    <td>发证机构：</td>
                    <td colspan="3"><input type="text" name="userresume.othorg" value="${userresume.othorg}"/></td>
                </tr>
                </tbody>
            </table>
            <div class="resumetitle" style="margin-top:5px;">8、培训经历&emsp;<span class="required">（若无培训经历可忽略！）</span>
            </div>
            <div>
                <c:if test="${empty trainings}">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">开始时间：</td>
                            <td width="240"><input type="text" name="usertraining[0].starttime" class="select"
                                                   onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                            <td width="100">结束时间：</td>
                            <td width="305"><input type="text" name="usertraining[0].endtime" class="select"
                                                   onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>培训课程：</td>
                            <td><input type="text" name="usertraining[0].course"/></td>
                            <td>培训机构：</td>
                            <td><input type="text" name="usertraining[0].organization"/></td>
                        </tr>
                        <tr>
                            <td>获得证书：</td>
                            <td colspan="3"><input type="text" name="usertraining[0].certificate"/></td>
                        </tr>
                        <tr>
                            <td>培训内容：</td>
                            <td colspan="3"><textarea name="usertraining[0].description"></textarea></td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="line"></div>
                </c:if>
                <c:forEach var="training" items="${trainings}" varStatus="item">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">开始时间：</td>
                            <td width="240"><input type="text" name="usertraining[${item.index}].starttime"
                                                   value="<fmt:formatDate value="${training.starttime}" pattern="yyyy-MM-dd" />"
                                                   class="select" onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                            <td width="100">结束时间：</td>
                            <td width="305"><input type="text" name="usertraining[${item.index}].endtime"
                                                   value="<fmt:formatDate value="${training.endtime}" pattern="yyyy-MM-dd" />"
                                                   class="select" onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>培训课程：</td>
                            <td><input type="text" name="usertraining[${item.index}].course"
                                       value="${training.course}"/></td>
                            <td>培训机构：</td>
                            <td><input type="text" name="usertraining[${item.index}].organization"
                                       value="${training.organization}"/></td>
                        </tr>
                        <tr>
                            <td>获得证书：</td>
                            <td colspan="3"><input type="text" name="usertraining[${item.index}].certificate"
                                                   value="${training.certificate}"/></td>
                        </tr>
                        <tr>
                            <td>培训内容：</td>
                            <td colspan="3"><textarea
                                    name="usertraining[${item.index}].description">${training.description}</textarea>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <c:if test='${item.index!=0}'>
                        <div class="resumedel">
                            <button type="button" class="delresumeitem">删除本条信息</button>
                        </div>
                    </c:if>
                    <div class="line"></div>
                </c:forEach>
                <div style="padding:5px 0;">
                    <button type="button" class="addresumeitem">添加一条培训经历信息</button>
                </div>
            </div>
            <div class="resumetitle" style="margin-top:5px;">9、获奖情况&emsp;<span class="required">（若无获奖可忽略！）</span></div>
            <div>
                <c:if test="${empty rewardpunishments}">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">奖励单位：</td>
                            <td width="213"><input type="text" name="userrewardpunishment[0].enterprise"/></td>
                            <td width="80">奖励名称：</td>
                            <td width="120"><input type="text" name="userrewardpunishment[0].name"/></td>
                            <td width="100">获得时间：</td>
                            <td width="120"><input type="text" name="userrewardpunishment[0].gettime" class="select"
                                                   onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>奖励原因：</td>
                            <td colspan="5"><textarea name="userrewardpunishment[0].reason"></textarea></td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="line"></div>
                </c:if>
                <c:forEach var="rewardpunishment" items="${rewardpunishments}" varStatus="item">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">奖励单位：</td>
                            <td width="213"><input type="text" name="userrewardpunishment[${item.index}].enterprise"
                                                   value="${rewardpunishment.enterprise}"/></td>
                            <td width="80">奖励名称：</td>
                            <td width="120"><input type="text" name="userrewardpunishment[${item.index}].name"
                                                   value="${rewardpunishment.name}"/></td>
                            <td width="100">获得时间：</td>
                            <td width="120"><input type="text" name="userrewardpunishment[${item.index}].gettime"
                                                   value="<fmt:formatDate value="${rewardpunishment.gettime}" pattern="yyyy-MM-dd" />"
                                                   class="select" onFocus="blur()"
                                                   onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        <tr>
                            <td>奖励原因：</td>
                            <td colspan="5"><textarea
                                    name="userrewardpunishment[${item.index}].reason">${rewardpunishment.reason}</textarea>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <c:if test='${item.index!=0}'>
                        <div class="resumedel">
                            <button type="button" class="delresumeitem">删除本条信息</button>
                        </div>
                    </c:if>
                    <div class="line"></div>
                </c:forEach>
                <div style="padding:5px 0;">
                    <button type="button" class="addresumeitem">添加一条获奖情况信息</button>
                </div>
            </div>
            <div class="resumetitle" style="margin-top:5px;">10、家庭成员</div>
            <div>
                <c:if test="${empty families}">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">姓名：</td>
                            <td width="240"><input type="text" name="userfamily[0].name"/></td>
                            <td width="100">与本人关系：</td>
                            <td><input type="text" name="userfamily[0].relationship"/></td>
                        </tr>
                        <tr>
                            <td>工作单位：</td>
                            <td><input type="text" name="userfamily[0].workunit"/></td>
                            <td>担任职务：</td>
                            <td><input type="text" name="userfamily[0].profession"/></td>
                        </tr>
                        <tr>
                            <td>联系方式：</td>
                            <td><input type="text" name="userfamily[0].contactway"/></td>
                            <td>出生日期：</td>
                            <td><input type="text" name="userfamily[0].birthday" class="select" onFocus="blur()"
                                       onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="line"></div>
                </c:if>
                <c:forEach var="familie" items="${families}" varStatus="item">
                    <table class="treeTable inputform">
                        <tbody>
                        <tr>
                            <td width="100">姓名：</td>
                            <td width="240"><input type="text" name="userfamily[${item.index}].name"
                                                   value="${familie.name}"/></td>
                            <td width="100">与本人关系：</td>
                            <td><input type="text" name="userfamily[${item.index}].relationship"
                                       value="${familie.relationship}"/></td>
                        </tr>
                        <tr>
                            <td>工作单位：</td>
                            <td><input type="text" name="userfamily[${item.index}].workunit"
                                       value="${familie.workunit}"/></td>
                            <td>担任职务：</td>
                            <td><input type="text" name="userfamily[${item.index}].profession"
                                       value="${familie.profession}"/></td>
                        </tr>
                        <tr>
                            <td>联系方式：</td>
                            <td><input type="text" name="userfamily[${item.index}].contactway"
                                       value="${familie.contactway}"/></td>
                            <td>出生日期：</td>
                            <td><input type="text" name="userfamily[${item.index}].birthday"
                                       value="<fmt:formatDate value="${familie.birthday}" pattern="yyyy-MM-dd" />"
                                       class="select" onFocus="blur()"
                                       onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"/></td>
                        </tr>
                        </tbody>
                    </table>
                    <c:if test='${item.index!=0}'>
                        <div class="resumedel">
                            <button type="button" class="delresumeitem">删除本条信息</button>
                        </div>
                    </c:if>
                    <div class="line"></div>
                </c:forEach>
                <div style="padding:5px 0;">
                    <button type="button" class="addresumeitem">添加一条家庭成员信息</button>
                </div>
            </div>
        </div>
    </form>
</div>
<script src="${path}/resources/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${path}/resources/js/plugins/laydate/laydate.js" type="text/javascript"></script>
<script src="${path}/resources/js/plugins/Validform/Validform_v5.3.2_min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {

        $("#Validform").Validform({
            ajaxPost: true,
            datatype: {//传入自定义datatype类型
                "zdata": /^[1-9]?\d{1}(\.\d+)?$/,
                //大于等于0的整数
                "zzs": /^([1-9]\d{0,}|0)$/,
                //大于0的整数
                "zzzs": /^[1-9]\d{0,}$/,
                //大于0的数
                "zs": /^[ + ]?(0\.\d+)|([1-9][0-9]*(\.\d+)?)$/

            },
            callback: function (data) {
                if (data.url != 'no') {
                    $.Showmsg(data.Message + ' 马上跳转...');
                } else {
                    $.Showmsg(data.Message);
                }
                setTimeout(function () {
                    $.Hidemsg();
                    if (data.url != 'no') {
                        location = data.url;
                    }
                }, 2000);
            }
        });

        //固定左侧照片
        fixDiv('resumemenu');
        //添加简历内容条目
        $('.addresumeitem').click(function () {
            if ($(this).parent().prev().prev().hasClass('resumedel')) {
                $(this).parent().before('<table class="treeTable inputform">' + $(this).parent().prev().prev().prev().html() + '</table><div class="line"></div>');
            } else {
                $(this).parent().before('<table class="treeTable inputform">' + $(this).parent().prev().prev().html() + '</table><div class="line"></div>');
            }
            $(this).parent().prev().before('<div class="resumedel"><button type="button" class="delresumeitem">删除本条信息</button></div>');

            $(this).parent().prev().prev().prev().find('input,textarea,select').val('');

            setItemSort($(this).parent().parent());
        });
        //删除简历内容条目
        $(document).delegate('.delresumeitem', 'click', function () {
            $(this).parent().prev().remove();
            $(this).parent().next().remove();
            setItemSort($(this).parent().parent());
            $(this).parent().remove();
        });

        //专业技术资格选择事件
        $('#postt').change(function () {
            var val = $(this).val();
            if (val != '') {
                getAjax('${path}/Common/getpostl?pid=' + $(this).val(), null, function (data) {
                    $('#postl').html('<option value="">请选择</option>' + data);
                });
            } else {
                $('#postl').html('<option value="">请选择</option>');
            }
            $('#postl').next().val(null);
            $('#postl').next().next().val(null);
        });
        //专业技术资格初始化
        getAjax('${path}/Common/getpostl?pid=${userresume.posttypecode}', null, function (data) {
            $('#postl').html('<option value="">请选择</option>' + data);
        });

        //技能等级选择事件
        $('#jndjp').change(function () {
            var val = $(this).val();
            if (val != '') {
                getAjax('${path}/Common/getjndj?type=2&pid=' + $(this).val(), null, function (data) {
                    $('#jndj').html('<option value="">请选择</option>' + data);
                });
            } else {
                $('#jndj').html('<option value="">请选择</option>');
            }
            $('#jndj').next().val(null);
            $('#jndj').next().next().val(null);
            $('#jnds').next().val(null);
            $('#jnds').next().next().val(null);
        });
        $('#jndj').change(function () {
            var val = $(this).val();
            if (val != '') {
                getAjax('${path}/Common/getjndj?type=3&r=' + $('#jndjp').val() + '&pid=' + $(this).val(), null, function (data) {
                    $('#jnds').html('<option value="">请选择</option>' + data);
                });
            } else {
                $('#jnds').html('<option value="">请选择</option>');
            }
            $('#jnds').next().val(null);
            $('#jnds').next().next().val(null);
        });

        //技能等级初始化
        getAjax('${path}/Common/getjndj?type=2&pid=${userresume.qllevelpid}', null, function (data) {
            $('#jndj').html('<option value="">请选择</option>' + data);
            getAjax('${path}/Common/getjndj?type=3&r=' + $('#jndjp').val() + '&pid=${userresume.qllevelcode}', null, function (data) {
                $('#jnds').html('<option value="">请选择</option>' + data);

            });
        });

        $('select').each(function () {
            $(this).val($(this).next().val());
        });

        $(document).delegate('select', 'change', function () {
            if ($(this).next().length != 0)
                $(this).next().val($(this).find("option:selected").val());
            if ($(this).next().next().length != 0)
                $(this).next().next().val($(this).find("option:selected").text());
        });

        setWidth();


        $('[name$=educationcode]').each(function () {
            //学历
            var xl = $(this).val();
            //学位
            var xwobj = $(this).parent().next().next().find('select');
            //学习形式
            var xxxsobj = $(this).parent().parent().next().find('td:eq(3) select');
            setEducation(xl, xwobj, xxxsobj);
        });
        $(document).delegate('[name$=educationcode]', 'change', function () {
            //学历
            var xl = $(this).val();
            //学位
            var xwobj = $(this).parent().next().next().find('select');
            //学习形式
            var xxxsobj = $(this).parent().parent().next().find('td:eq(3) select');
            setEducation(xl, xwobj, xxxsobj);
        });
    });

    function setItemSort(obj) {
        $(obj).find('table').each(function (index) {
            $(this).find('input[type=text],input[type=hidden],select,textarea').each(function () {
                var oldname = $(this).attr('name');
                var newname = oldname.substr(0, oldname.indexOf('[') + 1) + index + oldname.substr(oldname.indexOf(']'), oldname.length - oldname.indexOf(']'));
                $(this).attr('name', newname);
            });
        });
    }


    function setEducation(xl, xwobj, xxxsobj) {
        xwobj.empty();
        xxxsobj.empty();
        if (xl == '10') {
            xwobj.append('<option value="1">博士</option>');
            xwobj.next().val('1');
            xwobj.next().next().val('博士');
            xxxsobj.append('<option value="全日制">全日制</option><option value="在职">在职</option>');
        } else if (xl == '11') {
            xwobj.append('<option value="2">硕士</option>');
            xwobj.next().val('2');
            xwobj.next().next().val('硕士');
            xxxsobj.append('<option value="全日制">全日制</option><option value="在职">在职</option>');
        } else if (xl == '14') {
            xwobj.append('<option value="3">学士</option>');
            xwobj.next().val('3');
            xwobj.next().next().val('学士');
            xxxsobj.append('<option value="普通全日制">普通全日制</option><option value="非普通全日制">非普通全日制</option>');
        } else if (xl == '15' || xl == '16') {
            xwobj.append('<option value="0">-</option>');
            xwobj.next().val('0');
            xwobj.next().next().val('-');
            xxxsobj.append('<option value="普通全日制">普通全日制</option><option value="非普通全日制">非普通全日制</option>');
        } else if (xl == '17' || xl == '18' || xl == '19') {
            xwobj.append('<option value="0">-</option>');
            xwobj.next().val('0');
            xwobj.next().next().val('-');
            xxxsobj.append('<option value="-">-</option>');
        } else {
            xwobj.append('<option value="0">-</option>');
            xwobj.next().val('0');
            xwobj.next().next().val('-');
            xxxsobj.append('<option value="-">-</option>');
        }
    }

    //滚动的时候固定到浏览器顶部
    function fixDiv(id) {
        var obj = $("#" + id);
        //导航距离屏幕顶部距离
        var _defautlTop = 20;
        //导航距离屏幕左侧距离
        var _defautlLeft = obj.offset().left - $(window).scrollLeft();
        //导航默认样式记录，还原初始样式时候需要
        var _position = obj.css('position');
        var _top = obj.css('top');
        var _left = obj.css('left');
        var _zIndex = obj.css('z-index');
        setLocation(obj, _defautlTop, _defautlLeft, _position, _top, _left, _zIndex);
        //鼠标滚动事件
        $(window).scroll(function () {
            setLocation(obj, _defautlTop, _defautlLeft, _position, _top, _left, _zIndex);
        });
    }

    function setLocation(obj, _defautlTop, _defautlLeft, _position, _top, _left, _zIndex) {
        if ($(this).scrollTop() > _defautlTop) {
            //IE6不认识position:fixed，单独用position:absolute模拟
            if ('undefined' == typeof(document.body.style.maxHeight)) {
                obj.css({
                    'position': 'absolute',
                    'top': eval(document.documentElement.scrollTop),
                    'left': _defautlLeft,
                    'z-index': 99999
                });
                //防止出现抖动
                $("html,body").css({'background-image': 'url(about:blank)', 'background-attachment': 'fixed'});
            } else {
                obj.css({'position': 'fixed', 'top': 0, 'left': _defautlLeft, 'z-index': 999, 'padding-top': '0'});
            }
        } else {
            obj.css({'position': _position, 'top': _top, 'left': _left, 'z-index': _zIndex, 'padding-top': '0'});
        }
    }

    //页面样式渲染
    function setWidth() {
        $('select').each(function () {
            $(this).css('width', $(this).parent().width() - 5);
        });
        $('textarea').each(function () {
            $(this).css('width', $(this).parent().width() - 17);
        });
        $('input[type=text]').each(function () {
            $(this).css('width', $(this).parent().width() - parseFloat($(this).css("padding-left").replace('px', '')) - parseFloat($(this).css("padding-right").replace('px', '')) - 7);
        });
    }

    function getAjax(url, parm, callBack) {
        $.ajax({
            type: 'get',
            dataType: "text",
            url: url,
            data: parm,
            cache: false,
            async: false,
            success: function (msg) {
                callBack(msg);
            }
        });
    }
</script>
</body>
</html>